package com.ruoyi.vehicleDispatch.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vehicleDispatch.mapper.SpecialTimeDispatchRuleMapper;
import com.ruoyi.vehicleDispatch.domain.SpecialTimeDispatchRule;
import com.ruoyi.vehicleDispatch.service.ISpecialTimeDispatchRuleService;

/**
 * 特殊时段派单规则Service业务层处理
 * 
 * @author niuyi
 * @date 2025-08-19
 */
@Service
public class SpecialTimeDispatchRuleServiceImpl implements ISpecialTimeDispatchRuleService 
{
    @Autowired
    private SpecialTimeDispatchRuleMapper specialTimeDispatchRuleMapper;

    /**
     * 查询特殊时段派单规则
     * 
     * @param ruleId 特殊时段派单规则主键
     * @return 特殊时段派单规则
     */
    @Override
    public SpecialTimeDispatchRule selectSpecialTimeDispatchRuleByRuleId(Integer ruleId)
    {
        return specialTimeDispatchRuleMapper.selectSpecialTimeDispatchRuleByRuleId(ruleId);
    }

    /**
     * 查询特殊时段派单规则列表
     * 
     * @param specialTimeDispatchRule 特殊时段派单规则
     * @return 特殊时段派单规则
     */
    @Override
    public List<SpecialTimeDispatchRule> selectSpecialTimeDispatchRuleList(SpecialTimeDispatchRule specialTimeDispatchRule)
    {
        return specialTimeDispatchRuleMapper.selectSpecialTimeDispatchRuleList(specialTimeDispatchRule);
    }

    /**
     * 新增特殊时段派单规则
     * 
     * @param specialTimeDispatchRule 特殊时段派单规则
     * @return 结果
     */
    @Override
    public int insertSpecialTimeDispatchRule(SpecialTimeDispatchRule specialTimeDispatchRule)
    {
        return specialTimeDispatchRuleMapper.insertSpecialTimeDispatchRule(specialTimeDispatchRule);
    }

    /**
     * 修改特殊时段派单规则
     * 
     * @param specialTimeDispatchRule 特殊时段派单规则
     * @return 结果
     */
    @Override
    public int updateSpecialTimeDispatchRule(SpecialTimeDispatchRule specialTimeDispatchRule)
    {
        return specialTimeDispatchRuleMapper.updateSpecialTimeDispatchRule(specialTimeDispatchRule);
    }

    /**
     * 批量删除特殊时段派单规则
     * 
     * @param ruleIds 需要删除的特殊时段派单规则主键
     * @return 结果
     */
    @Override
    public int deleteSpecialTimeDispatchRuleByRuleIds(Integer[] ruleIds)
    {
        return specialTimeDispatchRuleMapper.deleteSpecialTimeDispatchRuleByRuleIds(ruleIds);
    }

    /**
     * 删除特殊时段派单规则信息
     * 
     * @param ruleId 特殊时段派单规则主键
     * @return 结果
     */
    @Override
    public int deleteSpecialTimeDispatchRuleByRuleId(Integer ruleId)
    {
        return specialTimeDispatchRuleMapper.deleteSpecialTimeDispatchRuleByRuleId(ruleId);
    }
}
